/**
@description _0220713文件

@copyright    Copyright 2022 ONES 复临科技
@version      1.0.0
@link         https://ones.ai
@author       venki.chen <chenwenchao@ones.ai>
@datetime     2022/7/13 16:09
*/

package main

import (
	"fmt"

	"gitee.com/venki/go_study_accumulate/go_ones/20220713/study"
)

func init() {
	fmt.Println("--main init--")
}

func main() {
	owner := study.Name
	welcome := fmt.Sprintf("%s，欢迎你……", owner)
	fmt.Println(welcome)
	fmt.Println("------------")
	arr := study.Arr
	fmt.Println(arr)
	/*practise()
	a := &study.A{
		B:    &study.B{Power: 1},
		Name: "",
	}
	a.Title()*/
	/*addSaiyan := &study.AddSaiyan{
		Name:   "venki",
		Power:  100,
		Father: &study.Saiyan{Name: "chen", Power: 1000},
	}
	fmt.Println(addSaiyan.Father)*/
	/*goku := &study.Saiyan{
		Name:  "Goku",
		Power: 9001,
	}
	goku.Super()
	fmt.Println(goku)*/
	/*goku := study.Saiyan{
		Name:  "goku",
		Power: 9000,
	}
	goku1 := new(study.Saiyan)
	fmt.Println(goku1)
	goku1.Power = 1
	goku1.Name = "chen"
	study.Super(&goku)
	fmt.Println(goku)
	study.Super(goku1)
	fmt.Println(goku1)*/
}

// 练习声明结构体
func practise() {
	// 声明结构体方式一：
	/*goku := study.Saiyan{
		Name:  "Goku",
		Power: 9000,
	}*/
	// 声明结构体方式二：
	/*goku := study.Saiyan{}
	goku.Name = strconv.Itoa(9000)*/
	// 声明结构体方式三：
	/*goku := study.Saiyan{"goku", 9000}*/
	// 声明结构体方式四：返回的是地址
	/*goku := new(study.Saiyan)*/

	/*fmt.Println(*goku)*/
}
